10 PRINT TAB(33);"SLALOM"
20 PRINT TAB(15);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
30 PRINT:PRINT:PRINT
310 PRINT "HOW MANY GATES DOES THIS COURSE HAVE (1 TO 25)";
320 INPUT V
330 IF V>25 THEN 360
340 IF V<1 THEN 390
350 GOTO 1440
360 PRINT "25 IS THE LIMIT."
370 LET V=25
380 GOTO 1440
390 PRINT "TRY AGAIN,"
400 GOTO 310
410 PRINT "RATE YOURSELF AS A SKIER, (1=WORST, 3=BEST)";
420 INPUT A
430 IF A<1 THEN 460
440 IF A>3 THEN 460
450 GOTO 480
460 PRINT "THE BOUNDS ARE 1-3"
470 GOTO 410
480 PRINT"THE STARTER COUNTS DOWN...5...4...3...2...1...GO!";
490 REM
500 LET T=0
510 LET S=INT(RND(1)*(18-9)+9)
520 PRINT
525 PRINT "YOU'RE OFF!"
530 FOR O=1 TO V
540    READ Q
550    PRINT
555    PRINT "HERE COMES GATE #";STR$(O);":"
560    PRINT S;"M.P.H."
570    LET S1=S
580    PRINT "OPTION";
590    INPUT O1
600    IF O1=0 THEN 970
610   IF O1>8 THEN 1420
620    IF O1<1 THEN 1420
630    GOSUB 990
640    IF S<7 THEN 1390
650    LET T=T+(Q-S+1)
660    IF S>Q THEN 1630
670 NEXT O
680 PRINT:PRINT "YOU TOOK";(T+RND(1));"SECONDS."
690 LET M=T
700 LET M=M/V
710 IF M<1.5-(A*.1) THEN 1650
720 IF M<2.9-(A*.1) THEN 1680
730 IF M<4.4-(A*.01) THEN 1710
740 PRINT:PRINT "DO YOU WANT TO RACE AGAIN";
750 INPUT B$
760 REM
770 IF B$="NO" THEN 1740
780 IF B$="YES" THEN 480
790 PRINT "PLEASE TYPE 'YES' OR 'NO'"
800 GOTO 740
810 STOP
820 PRINT
825 PRINT "*** SLALOM: THIS IS THE 1976 WINTER OLYMPIC GIANT SLALOM.  YOU ARE"
830 PRINT "            THE AMERICAN TEAM'S ONLY HOPE OF A GOLD MEDAL."
840 PRINT
845 PRINT "     0 -- TYPE THIS IF YOU WANT TO SEE HOW LONG YOU'VE TAKEN."
850 PRINT "     1 -- TYPE THIS IF YOU WANT TO SPEED UP A LOT."
860 PRINT "     2 -- TYPE THIS IF YOU WANT TO SPEED UP A LITTLE."
870 PRINT "     3 -- TYPE THIS IF YOU WANT TO SPEED UP A TEENSY."
880 PRINT "     4 -- TYPE THIS IF YOU WANT TO KEEP GOING THE SAME SPEED."
890 PRINT "     5 -- TYPE THIS IF YOU WANT TO CHECK A TEENSY."
900 PRINT "     6 -- TYPE THIS IF YOU WANT TO CHECK A LITTLE."
910 PRINT "     7 -- TYPE THIS IF YOU WANT TO CHECK A LOT."
920 PRINT "     8 -- TYPE THIS IF YOU WANT TO CHEAT AND TRY TO SKIP A GATE."
930 PRINT
935 PRINT " THE PLACE TO USE THESE OPTIONS IS WHEN THE COMPUTER ASKS:"
940 PRINT
945 PRINT "OPTION?"
950 PRINT
955 PRINT "                GOOD LUCK!"
957 PRINT
960 GOTO 1470
970 PRINT "YOU'VE TAKEN";(T+RND(1));"SECONDS."
980 GOTO 580
990 ON O1 GOTO 1130,1010,1170,1080,1190,1100,1150,1210
1000 STOP
1010 LET S=S+INT(RND(1)*(5-3)+3)
1020 PRINT S;"M.P.H."
1030 IF S>Q THEN 1290
1040 IF S>Q-1 THEN 1060
1050 RETURN
1060 PRINT "CLOSE ONE!"
1070 RETURN
1080 PRINT S;"M.P.H."
1090 GOTO 1030
1100 LET S=S-INT(RND(1)*(5-3)+3)
1110 PRINT S;"M.P.H."
1120 GOTO 1030
1130 LET S=S+INT(RND(1)*(10-5)+5)
1140 GOTO 1080
1150 LET S=S-INT(RND(1)*(10-5)+5)
1160 GOTO 1110
1170 LET S=S+INT(RND(1)*(4-1)+1)
1180 GOTO 1110
1190 LET S=S-INT(RND(1)*(4-1)+1)
1200 GOTO 1110
1210 PRINT "***CHEAT"
1220 IF RND(1)<.7 THEN 1260
1230 PRINT "YOU MADE IT!"
1240 LET T=T+1.5
1250 RETURN
1260 PRINT "AN OFFICIAL CAUGHT YOU!"
1270 PRINT "YOU TOOK";(T+RND(1));"SECONDS."
1280 GOTO 740
1290 IF RND(1)<((S-Q)*.1)+.2 THEN 1320
1300 PRINT "YOU WENT OVER THE NAXIMUM SPEED AND MADE IT!"
1310 RETURN
1320 PRINT "YOU WENT OVER THE MAXIMUM SPEED AND ";
1330 IF RND(1)<.5 THEN 1370
1340 PRINT "WIPED OUT!"
1350 PRINT "YOU TOOK";(T+RND(1));"SECONDS"
1360 GOTO 740
1370 PRINT "SNAGGED A FLAG!"
1380 GOTO 1350
1390 PRINT "LET'S BE REALISTIC, OK?  LET'S GO BACK AND TRY AGAIN..."
1400 LET S=S1
1410 GOTO 550
1420 PRINT "WHAT?"
1430 GOTO 580
1440 PRINT
1445 PRINT "TYPE ";CHR$(34);"INS";CHR$(34);" FOR INSTRUCTIONS"
1450 PRINT "TYPE ";CHR$(34);"MAX";CHR$(34);" FOR APPROXIMATE MAXIMUM SPEEDS"
1460 PRINT "TYPE ";CHR$(34);"RUN";CHR$(34);" FOR THE BEGINNING OF THE RACE"
1470 PRINT "COMMAND--";
1480 INPUT A$
1490 REM
1500 IF A$="INS" THEN 820
1510 IF A$="MAX" THEN 1550
1520 IF A$="RUN" THEN 410
1530 PRINT CHR$(34);A$;CHR$(34);" IS AN ILLEGAL COMMAND--RETRY";
1540 GOTO 1480
1550 PRINT "GATE MAX"
1560 PRINT " #  M.P.H."
1570 PRINT"----------"
1580 FOR B=1 TO V
1590    READ Q
1600    PRINT B;"  ";Q
1610 NEXT B
1620 GOTO 1470
1630 LET T=T+.5
1640 GOTO 670
1650 PRINT "YOU WON A GOLD MEDAL!"
1660 LET G(1)=G(1)+1
1670 GOTO 1730
1680 PRINT "YOU WON A SILVER MEDAL"
1690 LET S(1)=S(1)+1
1700 GOTO 1730
1710 PRINT "YOU WON A BRONZE MEDAL"
1720 LET B(1)=B(1)+1
1730 GOTO 740
1740 PRINT "THANKS FOR THE RACE"
1750 IF G(1)<1 THEN 1770
1760 PRINT "GOLD MEDALS:";G(1)
1770 IF S(1)<1 THEN 1790
1780 PRINT "SILVER MEDALS:";S(1)
1790 IF B(1)<1 THEN 1830
1800 PRINT "BRONZE MEDALS:";B(1)
1810 DATA 14,18,26,29,18,25,28,32,29,20,29,29,25,21,26,29,20,21,20
1820 DATA 18,26,25,33,31,22
1830 END
